public class MailClient {
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        try {
            
            GmailUtils gmail = new GmailUtils();
            gmail.setUserPass("cheesecake88888@gmail.com", "cheesecakerevolution");
            gmail.connect();
            gmail.openFolder("INBOX");
            
            int totalMessages = gmail.getMessageCount();
            int newMessages = gmail.getNewMessageCount();
            
            System.out.println("Total messages = " + totalMessages);
            System.out.println("New messages = " + newMessages);
            System.out.println("-------------------------------");
            
            //gmail.printAllMessageEnvelopes();
            gmail.printAllMessages();
            
        } catch(Exception e) {
            e.printStackTrace();
            System.exit(-1);
        }
        
    }
    
}